Collection::Detect
Section: ET++ method description (n)
Updated: automatically Fri Mar 1 10:57:30 1991
Index
Return to Main Contents
NAME
Collection::Detect - instance method
TEMPLATE
detectedObject = ObjPtr
Detect(BoolFun checkingFunction, void * functionArgument)
SPECIFIERS
public
virtual
DESCRIPTION
Detect returns an element of the receiver for which checkingFunction
evaluates to TRUE. If there is none such element, 0 is returned.
The argument functionArgument is passed to checkingFunction on every invocation.
It describes the context of evaluation.
The receiver must not be modified in checkingFunction.
For SeqCollections, the returned element is the one with the least index.
See also method Select.
Method is rarely overridden.
ARGUMENTS
- BoolFun checkingFunction
-
The arguments are:
(ObjPtr theReceiver, ObjPtr anElement, void *functionArgument).
- void * functionArgument
-
Effective type and semantics depend on checkingFunction.
RETURN ARGUMENT
- ObjPtr detectedObject
-
CATEGORIES
enumeration, client interface
FIRST DEFINITION
class Collection
FILES
- implementation:
-
Collection.C
KNOWN PROBLEMS
The current implementation allows limited modifications of the receiver
due to the use of an iterator. Exploiting this fact results in a
implementation dependency.
Index
- NAME
-
- TEMPLATE
-
- SPECIFIERS
-
- DESCRIPTION
-
- ARGUMENTS
-
- RETURN ARGUMENT
-
- CATEGORIES
-
- FIRST DEFINITION
-
- FILES
-
- KNOWN PROBLEMS
-
This document was created by
man2html,
using the manual pages.
Time: 00:40:30 GMT, March 30, 2022